Closed
Bug 578564
Opened 15 years ago
Closed 14 years ago
deCOMtaminate nsIFrameSetElement
Categories
(Core :: DOM: Core & HTML, defect)
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: khuey, Assigned: 46b)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 4 obsolete files)
There are a number of interfaces here that could be removed.
Assignee | ||
Comment 1•14 years ago
|
||
Attachment #520984 -
Flags: review?(khuey)
Reporter | ||
Comment 2•14 years ago
|
||
Comment on attachment 520984 [details] [diff] [review]
Moved the methods GetRowSpec and GetColSpec into class nsHTMLFrameSetElement and added a headerfile for it.
This is a little hard to make sense of. It looks like your editor is converting to Windows line endings. If you can attach a diff with the comments addressed and Unix line endings this will be much better.
>+ * Sebastian Kromp <46b@gulli.com>
Don't add your name to nsHTMLFrameSetElement.cpp, add it to the .h.
>+/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
>+/* ***** BEGIN LICENSE BLOCK *****
>+ * Version: MPL 1.1/GPL 2.0/LGPL 2.1
>+ *
>+ * The contents of this file are subject to the Mozilla Public License Version
>+ * 1.1 (the "License"); you may not use this file except in compliance with
>+ * the License. You may obtain a copy of the License at
>+ * http://www.mozilla.org/MPL/
>+ *
>+ * Software distributed under the License is distributed on an "AS IS" basis,
>+ * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
>+ * for the specific language governing rights and limitations under the
>+ * License.
>+ *
>+ * The Original Code is Mozilla Communicator client code.
>+ *
>+ * The Initial Developer of the Original Code is
>+ * Netscape Communications Corporation.
>+ * Portions created by the Initial Developer are Copyright (C) 1998
>+ * the Initial Developer. All Rights Reserved.
>+ *
>+ * Contributor(s):
>+ *
>+ * Alternatively, the contents of this file may be used under the terms of
>+ * either of the GNU General Public License Version 2 or later (the "GPL"),
>+ * or the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
>+ * in which case the provisions of the GPL or the LGPL are applicable instead
>+ * of those above. If you wish to allow use of your version of this file only
>+ * under the terms of either the GPL or the LGPL, and not to allow others to
>+ * use your version of this file under the terms of the MPL, indicate your
>+ * decision by deleting the provisions above and replace them with the notice
>+ * and other provisions required by the GPL or the LGPL. If you do not delete
>+ * the provisions above, a recipient may use your version of this file under
>+ * the terms of any one of the MPL, the GPL or the LGPL.
>+ *
>+ * ***** END LICENSE BLOCK ***** */
>+
It looks like you have two license blocks inside nsHTMLFrameSetElement.cpp. Remove the second one.
>diff -r 290712e55ade content/html/content/src/nsHTMLFrameSetElement.h
>+ * ***** END LICENSE BLOCK ***** */
>+#ifndef nsHTMLFrameSetElement_h__
>+#define nsHTMLFrameSetElement_h__
Newline between the comments and the macros please.
>+#endif nsHTMLFrameSetElement_h__
>+
>+
Only one newline at the end of the file.
Other than it looks good. Please fix the newlines and the comments and attach a new diff.
Attachment #520984 -
Flags: review?(khuey) → feedback+
Reporter | ||
Updated•14 years ago
|
Assignee: nobody → 46b
Status: NEW → ASSIGNED
Component: Tracking → DOM: Core & HTML
QA Contact: chofmann → general
Summary: deCOMtaminate content/html/content → deCOMtaminate nsIFrameSetElement
Comment 3•14 years ago
|
||
Please use nsHTMLFrameSetElement_h instead of nsHTMLFrameSetElement_h__ for the header guards. Identifiers with two consecutive underscores are reserved.
Assignee | ||
Comment 4•14 years ago
|
||
Attachment #520984 -
Attachment is obsolete: true
Attachment #521508 -
Flags: review?(khuey)
Reporter | ||
Comment 5•14 years ago
|
||
Comment on attachment 521508 [details] [diff] [review]
Moved the methods GetRowSpec and GetColSpec into class nsHTMLFrameSetElement and added a headerfile for it.(fixed)
>+ static nsHTMLFrameSetElement* FromContent(nsIContent *aContent)
>+ {
>+ if (aContent->NodeInfo()->Equals(nsGkAtoms::option, kNameSpaceID_XHTML))
>+ return static_cast<nsHTMLFrameSetElement*>(aContent);
>+ return nsnull;
>+ }
Ah, now that I can see, there's one problem here. This should be nsGkAtoms::frameset, since this is a frameset element.
Other than that it looks good. Fix that, attach a new patch, and request review from ":bz".
Attachment #521508 -
Flags: review?(khuey)
Assignee | ||
Comment 6•14 years ago
|
||
Attachment #521508 -
Attachment is obsolete: true
Attachment #521600 -
Flags: review?(bzbarsky)
![]() |
||
Comment 7•14 years ago
|
||
Can you please not make all those whitespace changes? That will make this patch much simpler to review and not mess up the blame....
If we do want to make the whitespace changes, that should be done in a separate patch with no substantive changes in it.
Assignee | ||
Comment 8•14 years ago
|
||
Sorry for that, didn´t mentioned that it was that messed up. I hope it is okay now.
Attachment #521600 -
Attachment is obsolete: true
Attachment #523008 -
Flags: review?(bzbarsky)
Attachment #521600 -
Flags: review?(bzbarsky)
![]() |
||
Comment 9•14 years ago
|
||
Comment on attachment 523008 [details] [diff] [review]
Moved the methods GetRowSpec and GetColSpec into class nsHTMLFrameSetElement and added a headerfile for it.(fixed whitespaces)
>+++ b/content/html/content/src/nsHTMLFrameSetElement.h Wed Mar 30 16:32:52 2011 +0200
It looks like you removed the old header and added the new one. You should probably change things so that you hg move the old header to the new name and then edit it. That would keep revision history better.
>+ if (aContent->NodeInfo()->Equals(nsGkAtoms::frameset, kNameSpaceID_XHTML))
if (aContent->IsHTML(nsGkAtoms::frameset))
>+++ b/layout/generic/nsFrameSetFrame.h Wed Mar 30 16:32:52 2011 +0200
>+#include "nsHTMLFrameSetElement.h"
Why is this include needed at all? Just including that header in nsFrameSetFrame.cpp should be enough.
Attachment #523008 -
Flags: review?(bzbarsky) → review-
Assignee | ||
Comment 10•14 years ago
|
||
Okay, had fixed all that you mentioned. Just out of curiosity: why is it better to include it in the *.cpp instead of the header?
Attachment #523008 -
Attachment is obsolete: true
Attachment #527859 -
Flags: review?(bzbarsky)
![]() |
||
Comment 11•14 years ago
|
||
Comment on attachment 527859 [details] [diff] [review]
Moved the methods GetRowSpec and GetColSpec into class nsHTMLFrameSetElement and added a headerfile for it.
> why is it better to include it in the *.cpp instead of the header?
Fewer chances of include hell if someone else includes the header.
Please restore the comments about GetRowSpec and GetColSpec that the interface used to have and remove the "// nsIFramesetElement" comment. r=me with those changes, and sorry for the terrible lag. :(
If you want me to just make those updates and push this, please let me know, ok? Otherwise, please set the checkin-needed keyword once you post an updated patch.
Attachment #527859 -
Flags: review?(bzbarsky) → review+
![]() |
||
Comment 12•14 years ago
|
||
Whiteboard: fixed-in-cedar
![]() |
||
Updated•14 years ago
|
Flags: in-testsuite-
Target Milestone: --- → mozilla7
Comment 13•14 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: fixed-in-cedar
Comment 14•14 years ago
|
||
This patch added a build warning due to the text after #endif here:
> #endif nsHTMLFrameSetElement_h
"nsHTMLFrameSetElement_h" wants to be a comment there. I pushed a trivial followup to fix that: http://hg.mozilla.org/mozilla-central/rev/79394c301944
Comment 15•14 years ago
|
||
Is there a way this fix can be verified by QA? If so, please help me with some test case/STR/guidelines.
Thank you
You need to log in
before you can comment on or make changes to this bug.
Description
•